I think what Ryback was initially saying with velocity could work.
Before we fixed AntiSTWH in the patch, I wrote a serverside script that would prevent STWH.
Basically what makes STWH work is the player leans into a wall. So the script checks if a player is leaning against the wall, and if they are, it pushes them back which stops STWH.
Anyway, what it sounds like is when you bash a player, instead of it damaging the enemy you push them away. So you're just executing a script from the bash animation that uses velocity to push them. Just play around with this script
main: level waittill prespawn level waittill spawn while(1) { //Do this for all players for(local.i = 1; local.i <= $player.size; local.i++) { local.player = $player[local.i] //Check if they’re leaning. You don’t really need this in your bash script local.lean = (local.player getcontrollerangles 0)[2] //This just checks if you’re leaning left. If you lean left the value is 0 > 16 if(local.lean > 0) { local.headpos = local.player gettagposition "eyes bone" local.origin = local.player gettagposition "Bip01 Spine" local.yes = sighttrace local.origin local.headpos 1 if(!local.yes) { iprintln "leaning left agaisnt something" for(local.j = 1; local.j <=16; local.j++) { //This is really the only piece of code that would be relevant in your bash/push script //Basically this applies the reverse amount of force that you lean into the wall //The script negates it. If you want to push harder, just increase the j value local.player.velocity += local.player.leftvector * -(local.j) } } } //This is exactly the same as above, only instead of checking leaning left, this checks leaning right //These values range from 0 < -16 else if(local.lean < 0) { local.headpos = local.player gettagposition "eyes bone" local.origin = local.player gettagposition "Bip01 Spine" local.yes = sighttrace local.origin local.headpos 1 if(!local.yes) { iprintln "leaning right agaisnt something" for(local.j = 1; local.j <=16; local.j++) { local.player.velocity += local.player.leftvector * (local.j) } } } } waitframe } end
Really, the only relevant piece of code you would need in what you're trying to accomplish is this:
local.player.velocity += x
Replace x with some number. The higher the number the greater the push back.
Play around with it and see what you can do.


Reply With Quote
, weekend is beer drinking time 
